//
//  DetailsFlowLayout.swift
//  Live
//
//  Created by ly on 16/5/7.
//  Copyright © 2016年 ly. All rights reserved.
//

import UIKit

class DetailsFlowLayout: UICollectionViewFlowLayout {
    override func prepareLayout() {
        super.prepareLayout()
        // 1.定义常量
        let cols : CGFloat = 2 //每行的个数
        let itmeW = (UIScreen.mainScreen().bounds.width - (cols + 1) * margin) / cols
        let itmeH = (UIScreen.mainScreen().bounds.height - statusBarH - titleScrollH - 49) / 4
        itemSize = CGSizeMake(itmeW, itmeH)
        minimumInteritemSpacing = margin
        minimumLineSpacing = margin
        
    }
}
